package com.szcinda.service.dto.client;

import com.szcinda.repository.CalculateType;
import com.szcinda.service.dto.linePrice.LinePriceImportDto;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

@Data
public class ClientCreateDto implements Serializable {
    private String code;
    private String name;
    private String fullName;
    private String licence;
    private int settlementDays;
    private String organizationId;
    private String departurePort;
    private String customsType;

    private double homeFee;// 主页费单价
    private double sheetFee;// 续页费单价
    private String currency;
    private String sheetCurrency;

    private String opId;

    private ContractDto contract;

    private List<ExchangeRateDto> rates;
    private List<FeeDto> fees;

    private List<ClientVehiclePriceDto> vehiclePrices;

    @Data
    public static class ContractDto implements Serializable {
        private String contractNumber;
        private String contractName;
        private LocalDate signedDate;
        private LocalDate expiresDate;
        private LocalDate remindDate;
    }

    @Data
    public static class LinePrice implements Serializable {
        private String from;
        private String to;
        private CalculateType calculateType;
    }

    @Data
    public static class FeeDto implements Serializable {
        private String feeName;
        private double feeCount;
        private String currency;
    }

    @Data
    public static class ExchangeRateDto implements Serializable {
        private String fromRate;
        private String toRate;
        private double rate;
    }

    private List<LinePriceImportDto> linePriceImportDtoList;
}
